<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css">
        .ul11 li{width: 25%;}
    </style>
</head>
<link rel="stylesheet" type="text/css" href="/newadmin/Public/home/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/newadmin/Public/home/css/base.css">
<link rel="stylesheet" href="/newadmin/Public/home/css/header.css" />
<link rel="stylesheet" type="text/css" href="/newadmin/Public/home/css/grzh_sj.css">
<link rel="stylesheet" href="/newadmin/Public/home/css/wodedaili.css" />
<script type="text/javascript" src="/newadmin/Public/home/js/jquery.min.js"></script>
<script type="text/javascript" src="/newadmin/Public/home/js/bootstrap.min.js"></script>
<body>
<div class="header">
    <div class="content">
        <img src="/newadmin/Public/home/img/login.png" />
        <div class="mune">
            <div ><a href="<?php echo U('Index/index');?>">见证首页</a></div>
            <div class="active"><a href="<?php echo U('Money/money');?>">成为代理</a></div>
            <div><a href="<?php echo U('Personal/user');?>">会员中心</a></div>
        </div>
        <p class="rexian">客服热线：<span>14141414141</span></p>
        <p class="zhengjian">欢迎来到正见代理系统</p>
        <a href="javascript:;">进入正见官网》</a>
        <a href="<?php echo U('User/login');?>">登陆</a>
        <a href="<?php echo U('User/logout');?>">退出</a>
        <a href="<?php echo U('User/register');?>">注册</a>
    </div>
</div>


<div class="banner">
    <div>
        <!--<img src="/newadmin/Public/home/img/login.png">-->
        <p>
            <span>共有名额 :<span><?php echo ($list["cnum"]); ?></span>个</span>
            <span>已用名额 :<span><?php echo ($list["xnum"]); ?></span>个</span>
            <span>剩余名额 :<span><?php echo ($list["snum"]); ?></span>个</span>
        </p>
    </div>
</div>
<div class="nav">
    <div class="" style="width: 1200px;margin: 0 auto;">
        <ul class="" style="width: 870px;margin-left: 320px;">
            <ul class="clearfix ul11">
                <li style="float: left;" class=""><a href="<?php echo U('Parent/wddls');?>">我的代理商</a></li>
                <li style="float: left;" class=""><a href="<?php echo U('Parent/index');?>">申请记录</a></li>
                <li style="float: left;" class=""><a href="<?php echo U('Money/money');?>" class="active">升级</a></li>
                <li style="float: left;" class=""><a href="<?php echo U('Personal/user');?>" >个人资料设置</a></li>
            </ul>
        </ul>
    </div>
</div>
<div class="main">
    <div style="width: 1200px;margin: 0 auto;">
        <div class=" clearfix">
            <div style="width: 292px;float: left;">
                <div class="panel panel-default">
                    <!-- Default panel contents -->
                    <div class="panel-heading">个人资料</div>
                    <!-- List group -->
                    <ul class="list-group">
                        <li class="list-group-item"><span class="glyphicon glyphicon-user"></span>&nbsp;&nbsp;&nbsp;昵称：<?php echo ($list["user"]); ?></li>
                        <li class="list-group-item"><span class="glyphicon glyphicon-star-empty"></span>&nbsp;&nbsp;&nbsp;等级：<?php echo ($list["level"]); ?></li>
                        <li class="list-group-item"><span class="glyphicon glyphicon-phone-alt"></span>&nbsp;&nbsp;&nbsp;电话：<?php echo ($list["phone"]); ?></li>
                        <li class="list-group-item">&nbsp;&nbsp;&nbsp;&nbsp;上级：<?php echo ($list["parent"]); ?></li>
                        <li class="list-group-item">&nbsp;&nbsp;&nbsp;&nbsp;我的邀请码：<?php echo ($list["code"]); ?></li>
                        <li class="list-group-item"><a href="<?php echo U('Notice/index');?>">查看更多资料</a></li>
                    </ul>

                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">我的余额</h3>
                    </div>
                    <div class="panel-body">
                        余额：<?php echo ($list["num"]); ?>
                    </div>
                </div>

            </div>
            <div style="width: 870px; float: right;">
                <!--<div class="panel panel-default">-->
                    <!--<div class="panel-heading">-->
                        <!--<h3 class="panel-title">公告栏</h3>-->
                    <!--</div>-->
                    <!--<div class="panel-body">-->
                        <!--所剩名额不多请升级，或向上级购买名额-->
                    <!--</div>-->
                <!--</div>-->
                <div class="panel panel-warning">
                    <!-- Default panel contents -->
                    <div class="panel-heading">请选择升级类别</div>
                    <div class="panel-body">
                        <ul class="">
                            <li class="shenji"  >
                                <img src="/newadmin/Public/home/img/vip_03.png">&nbsp;<span>vip</span>&nbsp;&nbsp;&nbsp;<span class="jiaqian"><?php echo ($config["vip"]); ?>元</span>
                            </li>
                            <li class="shenji"  >
                                <img src="/newadmin/Public/home/img/vip_03.png">&nbsp;<span>天使</span>&nbsp;&nbsp;&nbsp;<span class="jiaqian"><?php echo ($config["first"]); ?>元</span>
                            </li>
                            <li class="shenji"  >
                                <img src="/newadmin/Public/home/img/vip_03.png">&nbsp;<span>梦想</span>&nbsp;&nbsp;&nbsp;<span class="jiaqian"><?php echo ($config["second"]); ?>元</span>
                            </li>
                        </ul>
                        <button class="btn btn-danger cztj">充值</button>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>


</body>
<script type="text/javascript">

    var int1 = '';
    var order = 1;
    $('.shenji').click(function(){
        $(this).css({'border':'1px solid red'}).siblings().css({'border':'1px solid #999999'})
        order = 2;
        int1 = $('.shenji').index(this);
    })

    $('.btn').click(function(){

        if(order == 2){
            order == 1;
        }else{
            order ==1;
            alert('请先选中升级对象');
        }
        var level = '';
        if(int1 == 0){
            level = 2;
        }else if(int1 == 1){
            level = 3;
        }else if(int1 == 2){
            level = 4;
        }

        $.ajax({
            'type':'post',
            'url':"<?php echo U('Money/addmoney');?>",
            'data':{'level':level},
            success:function(data){

                if(data.code == 1){
                    alert(data.message);
                }else{
                    alert(data.message);
                }
            },

            error:function(data){

            }
        });
    })
</script>
</html>